package com.test;

public class ColumnUtil {

	public static String toEntityName(String fieldName, boolean toUpper) {
		String newFieldName = "";
		String[] fieldNameAry = fieldName.split("");
		for (int i = 0; i < fieldNameAry.length; i++) {
			String fieldNameTmp = fieldNameAry[i];
			if(fieldNameTmp.equals("_")){
				i++;
				fieldNameTmp = fieldNameAry[i];
				if(toUpper){
					fieldNameTmp = fieldNameTmp.toUpperCase();
				}
			}
			newFieldName += fieldNameTmp;
		}

		return newFieldName;
	}
	
}
